Skip to content

Add RTL document direction detection#1320

Closed
bilbo-22 wants to merge 1 commit intopingdotgg:mainfrom
bilbo-22:feat/rtl-document-dir
Closed

Add RTL document direction detection#1320
bilbo-22 wants to merge 1 commit intopingdotgg:mainfrom
bilbo-22:feat/rtl-document-dir

Conversation

@bilbo-22
Copy link

@bilbo-22 bilbo-22 commented Mar 23, 2026

Summary

  • detect common RTL locales from the browser preferred language list
  • set document.documentElement.dir to rtl at app startup
  • keep the change limited to a few lines in the web entrypoint

Testing

  • not run (kept minimal; no dependency install in this environment)

Note

Add RTL document direction detection based on browser locale

In main.tsx, sets document.documentElement.dir to "rtl" or "ltr" at startup based on the user's browser language. The detected locale is derived from navigator.languages (first non-empty entry) with a fallback to navigator.language, and is matched against a regex covering ar, dv, fa, he, ku, ps, sd, ug, ur, and yi.

Macroscope summarized 4c042dc.

@coderabbitai
Copy link

coderabbitai bot commented Mar 23, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: f8181acf-ced8-44a3-98c9-edd82ca5e060

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can disable the changed files summary in the walkthrough.

Disable the reviews.changed_files_summary setting to disable the changed files summary in the walkthrough.

@github-actions github-actions bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Mar 23, 2026
@bilbo-22 bilbo-22 closed this Mar 23, 2026
@bilbo-22 bilbo-22 deleted the feat/rtl-document-dir branch March 23, 2026 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant